package xyz.fcidd.monitor.listener;

import lombok.SneakyThrows;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import xyz.fcidd.monitor.service.impl.UserServiceImpl;

public class Event implements Listener {
    @SneakyThrows
    @EventHandler
    public void joinEvent(PlayerJoinEvent joinEvent){
        UserServiceImpl userService=new UserServiceImpl();
        userService.joinPlayer(joinEvent);
    }

    @EventHandler
    public void quitEvent(PlayerQuitEvent quitEvent){
        UserServiceImpl userService=new UserServiceImpl();
        userService.quitPlayer(quitEvent);
    }
}
